<div class="form">


<?php $form = $this->beginWidget('GxActiveForm', array(
	'id' => 'delivery-customer-model-form',
	'enableAjaxValidation' => false,
));
?>

	<p class="note">
		<?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
	</p>

	<?php echo $form->errorSummary($model); ?>

		
		<?php if(isset($model->code)):?>
		<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->checkBox($model, 'status'); ?>
		<?php echo $form->error($model,'status'); ?>
		</div><!-- row -->
		<div class="row">
			<?php echo $form->labelEx($model,'code'); ?>
			<?php echo $model->code;?>
		</div><!-- row -->
		<?php endif;?>
		<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model, 'name', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'name'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'company'); ?>
		<?php echo $form->textField($model, 'company', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'company'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'address'); ?>
		<?php echo $form->textField($model, 'address', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'address'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'billing_address'); ?>
		<?php echo $form->textField($model, 'billing_address', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'billing_address'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'mst'); ?>
		<?php echo $form->textField($model, 'mst', array('maxlength' => 50)); ?>
		<?php echo $form->error($model,'mst'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'phone'); ?>
		<?php echo $form->textField($model, 'phone', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'phone'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'fax'); ?>
		<?php echo $form->textField($model, 'fax', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'fax'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'person_contact'); ?>
		<?php echo $form->textField($model, 'person_contact', array('maxlength' => 255)); ?>
		<?php echo $form->error($model,'person_contact'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model, 'email', array('maxlength' => 100)); ?>
		<?php echo $form->error($model,'email'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'office_offer'); ?>
		<input type="text" name="office_name" disabled="disabled" value="<?php echo OfficeModel::model()->findByPk(Yii::app()->user->office_id)->name;?>" />
		<?php echo $form->hiddenField($model, 'office_offer', array('maxlength' => 100, 'value'=>Yii::app()->user->office_id)); ?>
		<?php echo $form->error($model,'office_offer'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'office_person'); ?>
		<input type="text" name="officer_name" disabled="disabled" value="<?php echo Yii::app()->user->username;?>" />
		<?php echo $form->hiddenField($model, 'office_person', array('maxlength' => 100, 'value'=>Yii::app()->user->id)); ?>
		<?php echo $form->error($model,'office_person'); ?>
		</div><!-- row -->
<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class'=>'btn'));
$this->endWidget();
?>
</div><!-- form -->